#ifndef TABLEMANAGEMENT_H
#define TABLEMANAGEMENT_H

#include "tableform.h"
#include <QWidget>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QMessageBox>
#include <QDebug>
#include <QSqlError>
#include <QInputDialog>
#include <QListWidgetItem>
#include <QListWidget>
#include <QKeyEvent>
#include <QPrintPreviewDialog>
#include <QPrintDialog>
#include <QPrinter>
#include <QPainter>

namespace Ui {
class tableManagement;
}

class tableManagement : public QWidget
{
    Q_OBJECT

signals:
    void checkoutSend(QString message);

public:
    explicit tableManagement(QWidget *parent = nullptr);
    ~tableManagement();

private slots:

    void on_numberEdit_returnPressed();

    void on_tableList_itemClicked(QListWidgetItem *item);

    void on_checkoutBtn_clicked();

    void drawPic(QPrinter* printerPixmap);

private:
    Ui::tableManagement *ui;
    QSqlDatabase db;
    void initList();
    int tableNumber,globalid;
};

#endif // TABLEMANAGEMENT_H
